from enum import Enum


class TypeEnum(Enum):
    TYPE1 = (1, "type1", "类型1")

    def __init__(self, value, name, desc):
        self.code = value
        self.code_name = name
        self.desc = desc

    @classmethod
    def print(cls):
        for item in cls:
            print(item.value, item.name, item.code, item.code_name, item.desc)


TypeEnum.print()
